-
Notifications
You must be signed in to change notification settings - Fork 51
feat(account): support importing hmcl accounts #1255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Xun_Ying <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements account import functionality from other Minecraft launchers (specifically HMCL). It's marked as WIP (Work in Progress) and adds a two-stage import process: retrieving account information from external launchers, then importing selected accounts and auth servers into SJMCL.
Changes:
- Added new
ImportLauncherTypeenum and two new account service methods for importing external account data - Created
ImportAccountInfoModalcomponent with UI for selecting accounts and auth servers to import - Implemented HMCL account parsing logic in Rust, supporting offline, Microsoft, and third-party accounts
- Added comprehensive localization support for import functionality in English and Chinese
Reviewed changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/services/account.ts | Added two new service methods for retrieving and importing external launcher account info |
| src/pages/accounts.tsx | Integrated import modal into accounts page UI |
| src/components/modals/import-account-info-modal.tsx | New modal component for account import workflow |
| src/enums/account.ts | Added ImportLauncherType enum for supported launchers |
| src/components/common/selectable-card.tsx | Removed conditional margin styling |
| src/locales/*.json | Added translations for import functionality and moved generic "import" button text |
| src-tauri/src/lib.rs | Registered two new Tauri commands for account import |
| src-tauri/src/account/models.rs | Refactored Player::from to support custom auth server lists |
| src-tauri/src/account/helpers/import/*.rs | New import module with HMCL parser implementation |
| src-tauri/src/account/commands.rs | Implemented retrieve and import commands for external accounts |
| src-tauri/src/account/helpers/authlib_injector/*.rs | Refactored to support empty texture properties |
| public/images/icons/external/*.png | Added launcher icons for SCL and PCL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 17 out of 20 changed files in this pull request and generated no new comments.
Checklist
This PR is a ..
Related Issues
close #1226
Description
Additional Context